home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
IDLIncludes
/
HIImagingObjects.idl
< prev
next >
Wrap
Text File
|
1996-05-01
|
9KB
|
320 lines
/*
File: HIImagingObjects.idl
Contains: Interfaces to image layout and drawing objects.
Version: Technology: Copland
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1995-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __HIIMAGINGOBJECTS_IDL__
#define __HIIMAGINGOBJECTS_IDL__
#include <somobj.idl>
#include <somcls.idl>
#include <Collections.idl>
#include <TextCommon.idl>
#include <TextObjects.idl>
#include <Types.idl>
#include <Icons.idl>
#include <Quickdraw.idl>
#include <AppleEvents.idl>
#include <Fonts.idl>
#include <Resources.idl>
#include <HIObjectTypes.idl>
#include <HIImagingObjectTypes.idl>
interface HIImagingObject : SOMObject
{
// ======================================================
// Public Methods
// ======================================================
OSStatus NewImage( out HIImageRef imageRefPtr );
OSStatus GetNewImage( in AESubDesc initializer, out HIImageRef imageRefPtr );
HIImageRef CloneImage( in HIImageRef imageRef );
OSStatus ReleaseImage( in HIImageRef imageRef );
ItemCount GetImageOwnerCount (in ConstHIImageRef imageRef );
OSStatus InitFromAERecord( in HIImageRef imageRef, in AESubDesc dataForBaseClass,
in AESubDesc dataForClass, in HIAERecordDataFormat dataFormat);
OSStatus WriteToAERecord( in ConstHIImageRef imageRef, in AERecord dataForSubclass,
in AERecord dataForClass, in HIAERecordDataFormat dataFormat);
OSStatus MeasureImage( in ConstHIImageRef imageRef, in CGrafPtr port,
out UInt32 widthPtr, out UInt32 heightPtr,
in HIImageOptions measureOptions );
OSStatus DrawImage( in ConstHIImageRef imageRef, in CGrafPtr port,
in Rect contentRect, in Rect frameRect /* may be NULL */,
in HIImageOptions drawOptions );
// ======================================================
// Protected Methods
// For use only by imaging object implementation
// ======================================================
OSStatus DisposeImage ( in HIImageRef imageRef );
// ======================================================
// Procedural calls
// These are not object methods, but rather static functions
// ======================================================
// Returns an HIImagingObject of the correct type
HIImagingObject GetHIImagingObject(in HIImageType imageType);
// Returns the type of an ImageRef
HIImageType GetImageType( in ConstHIImageRef imageRef );
// Make a new typed image ref from data in a resource
OSStatus GetNewImageFromResource( in ResID objectInitializerResourceID, out HIImageRef imageRefPtr );
#ifdef __SOMIDL__
implementation {
passthru C_h = "#include <Collections.h>"
"#include <Quickdraw.h>"
"#include <TextEdit.h>"
"#include <TextObjects.h>"
"#include <Types.h>"
"#include <Resources.h>"
"#include <HIObjectTypes.h>"
"#include <HIImagingObjectTypes.h>";
passthru C_xh = "#include <Collections.h>"
"#include <Quickdraw.h>"
"#include <TextEdit.h>"
"#include <TextObjects.h>"
"#include <Types.h>"
"#include <Resources.h>"
"#include <HIObjectTypes.h>"
"#include <HIImagingObjectTypes.h>";
GetHIImagingObject: procedure, noself;
GetImageType: procedure, noself;
GetNewImageFromResource: procedure, noself;
CloneImage: nooverride;
ReleaseImage: nooverride;
GetImageOwnerCount: nooverride;
releaseorder: NewImage,
DisposeImage,
InitFromAERecord,
WriteToAERecord,
GetImageType,
MeasureImage,
DrawImage,
GetHIImagingObject,
GetNewImage,
GetNewImageFromResource,
CloneImage,
ReleaseImage,
GetImageOwnerCount;
};
#endif
};
interface HICompositeImagingObject : HIImagingObject
{
// ======================================================
// Public Methods
// ======================================================
OSStatus SetImageSize( in HIImageRef imageRef, in UInt16 width, in UInt16 height ); // Same values returned by "MeasureImage"
OSStatus AddSubImages( in HIImageRef imageRef, in UInt32 index, in UInt32 count );
OSStatus SetSubImage( in HIImageRef imageRef, in UInt32 index,
in ConstHIImageRef subHIImageRef, in Rect subImageRect, in HIImageOptions options );
OSStatus GetSubImage( in ConstHIImageRef imageRef, in UInt32 index,
out HIImageRef subHIImageRefPtr, out Rect subImageRect, out HIImageOptions options );
UInt32 GetSubImageCount( in ConstHIImageRef imageRef );
implementation
{
releaseorder: SetImageSize,
AddSubImages,
SetSubImage,
GetSubImage,
GetSubImageCount;
};
};
interface HIIconImagingObject : HIImagingObject
{
// ======================================================
// Public Methods
// ======================================================
OSStatus SetIcon( in HIImageRef imageRef, in Handle iconSuite );
OSStatus GetIcon( in ConstHIImageRef imageRef, out Handle iconSuitePtr );
// *** need icon drawing attributes similar to TextStrikeRef
implementation
{
passthru C_h = "#include <Collections.h>"
"#include <Quickdraw.h>"
"#include <TextEdit.h>"
"#include <TextObjects.h>"
"#include <Types.h>"
"#include <HIObjectTypes.h>"
"#include <HIImagingObjectTypes.h>";
passthru C_xh = "#include <Collections.h>"
"#include <Quickdraw.h>"
"#include <TextEdit.h>"
"#include <TextObjects.h>"
"#include <Types.h>"
"#include <HIObjectTypes.h>"
"#include <HIImagingObjectTypes.h>";
releaseorder: SetIcon,
GetIcon;
};
};
interface HIPatternImagingObject : HIImagingObject
{
// ======================================================
// Public Methods
// ======================================================
OSStatus SetPattern( in HIImageRef imageRef, in PixPatHandle pattern );
OSStatus GetPattern( in ConstHIImageRef imageRef, out PixPatHandle pattern );
implementation
{
passthru C_h = "#include <Collections.h>"
"#include <Quickdraw.h>"
"#include <TextEdit.h>"
"#include <TextObjects.h>"
"#include <Types.h>"
"#include <HIObjectTypes.h>"
"#include <HIImagingObjectTypes.h>";
passthru C_xh = "#include <Collections.h>"
"#include <Quickdraw.h>"
"#include <TextEdit.h>"
"#include <TextObjects.h>"
"#include <Types.h>"
"#include <HIObjectTypes.h>"
"#include <HIImagingObjectTypes.h>";
releaseorder: SetPattern,
GetPattern;
};
};
interface HIPictureImagingObject : HIImagingObject
{
// ======================================================
// Public Methods
// ======================================================
OSStatus SetPicture( in HIImageRef imageRef, in PicHandle picture );
OSStatus GetPicture( in ConstHIImageRef imageRef, out PicHandle picturePtr );
implementation
{
passthru C_h = "#include <Collections.h>"
"#include <Quickdraw.h>"
"#include <TextEdit.h>"
"#include <TextObjects.h>"
"#include <Types.h>"
"#include <HIObjectTypes.h>"
"#include <HIImagingObjectTypes.h>";
passthru C_xh = "#include <Collections.h>"
"#include <Quickdraw.h>"
"#include <TextEdit.h>"
"#include <TextObjects.h>"
"#include <Types.h>"
"#include <HIObjectTypes.h>"
"#include <HIImagingObjectTypes.h>";
releaseorder: SetPicture,
GetPicture;
};
};
interface HITextImagingObject : HIImagingObject
{
// ======================================================
// Public Methods
// ======================================================
OSStatus SetText( in HIImageRef imageRef, in TextObject textObject );
OSStatus GetText( in ConstHIImageRef imageRef, out TextObject textObjectPtr );
OSStatus SetStrike( in HIImageRef imageRef, in TextStrikeRef strike);
OSStatus GetStrike( in ConstHIImageRef imageRef, out TextStrikeRef strike);
implementation
{
passthru C_h = "#include <Collections.h>"
"#include <Fonts.h>"
"#include <Quickdraw.h>"
"#include <TextEdit.h>"
"#include <TextObjects.h>"
"#include <Types.h>"
"#include <HIObjectTypes.h>"
"#include <HIImagingObjectTypes.h>";
passthru C_xh = "#include <Collections.h>"
"#include <Fonts.h>"
"#include <Quickdraw.h>"
"#include <TextEdit.h>"
"#include <TextObjects.h>"
"#include <Types.h>"
"#include <HIObjectTypes.h>"
"#include <HIImagingObjectTypes.h>";
releaseorder: SetText,
GetText,
SetStrike,
GetStrike,
TextImageMgr__reserved0,
TextImageMgr__reserved1;
};
};
#endif